Skip to content

feat(azure_foundry): auto-discover deployed models on Azure AI Services#303

Merged
mpfaffenberger merged 5 commits intompfaffenberger:mainfrom
breedx:feature/foundry-auto-discovery
Apr 23, 2026
Merged

feat(azure_foundry): auto-discover deployed models on Azure AI Services#303
mpfaffenberger merged 5 commits intompfaffenberger:mainfrom
breedx:feature/foundry-auto-discovery

Conversation

@breedx
Copy link
Copy Markdown
Contributor

@breedx breedx commented Apr 22, 2026

Summary

/foundry-setup now auto-discovers all deployed models on an Azure AI Services account via the Azure Management API. Supports both Anthropic and OpenAI model formats automatically.

Previously, setup required manually entering deployment names for three hardcoded Claude tiers. Now it queries the account, shows what's deployed, and configures everything in one step.

What changed

  • discovery.py (new) — find_account() searches across subscriptions, list_deployments() enumerates deployments via ARM API
  • register_callbacks.py — setup wizard uses auto-discovery with manual fallback; new azure_foundry_openai model type handler for OpenAI models with Azure AD token auth
  • utils.pyadd_discovered_models_to_config() classifies Anthropic vs OpenAI; remove/get handle both types
  • provider_identity.py — +1 line: register azure_foundry_openai identity

How it works

  1. User runs /foundry-setup, enters resource name
  2. Plugin queries Azure Management API to find the account and list deployments
  3. Shows all active deployments with model format (Anthropic/OpenAI)
  4. User confirms, plugin auto-configures each as the appropriate type
  5. If discovery fails (no management API access), falls back to manual entry

Test plan

  • /foundry-setup with valid Azure AI Services resource — discovers all deployments
  • Mixed Anthropic + OpenAI deployments classified correctly
  • /foundry-status shows both model types
  • /foundry-remove cleans up both types
  • Discovery failure falls back to manual entry gracefully

/foundry-setup now queries the Azure Management API to find all
deployments on the specified AI Services account. Supports both
Anthropic and OpenAI model formats automatically.

- Add discovery.py: find_account() and list_deployments() via ARM API
- Add azure_foundry_openai model type for OpenAI on Azure with AD auth
- Setup wizard: auto-discover → confirm → configure, manual fallback
- remove/get/status commands now handle both model types
@breedx
Copy link
Copy Markdown
Contributor Author

breedx commented Apr 22, 2026

image

breedx added 2 commits April 22, 2026 18:52
- Discovery: find_account, list_deployments, management token/API mocks
- add_discovered_models_to_config: OpenAI, Anthropic, and mixed deployments
- remove: verifies both azure_foundry and azure_foundry_openai types cleaned
- OpenAI model handler: no resource, no name, auth failure, success
- Updated register_model_types test for 2 types
@mpfaffenberger
Copy link
Copy Markdown
Owner

Can we get on a super quick call and you can give me a demo? :D

@breedx
Copy link
Copy Markdown
Contributor Author

breedx commented Apr 22, 2026

@mpfaffenberger

Can we get on a super quick call and you can give me a demo? :D

I sent you a teams meetings request for tomorrow, if that is ok :)

Discovery was hardcoding 128K for all OpenAI models. Added a lookup
table since Azure's catalog API doesn't expose context window sizes.
@breedx
Copy link
Copy Markdown
Contributor Author

breedx commented Apr 23, 2026

image

@breedx
Copy link
Copy Markdown
Contributor Author

breedx commented Apr 23, 2026

image had to set the thinking to 'detailed'

@breedx
Copy link
Copy Markdown
Contributor Author

breedx commented Apr 23, 2026

codex works
image

- Use OpenAIResponsesModel for GPT-5 models on Azure Foundry
- Add azure_foundry_openai to uses_responses_api check
- Default reasoning_summary to "detailed" (auto breaks 5.3 codex)
- Auto-discover supported_settings per model family (GPT-5 gets
  reasoning_effort, summary, verbosity)
- Update tests for Responses API model path
@mpfaffenberger mpfaffenberger merged commit fa05da9 into mpfaffenberger:main Apr 23, 2026
mpfaffenberger pushed a commit that referenced this pull request Apr 23, 2026
…es (#303)

* feat(azure_foundry): auto-discover deployed models on Azure AI Services

/foundry-setup now queries the Azure Management API to find all
deployments on the specified AI Services account. Supports both
Anthropic and OpenAI model formats automatically.

- Add discovery.py: find_account() and list_deployments() via ARM API
- Add azure_foundry_openai model type for OpenAI on Azure with AD auth
- Setup wizard: auto-discover → confirm → configure, manual fallback
- remove/get/status commands now handle both model types

* test(azure_foundry): add tests for discovery and OpenAI model handler

- Discovery: find_account, list_deployments, management token/API mocks
- add_discovered_models_to_config: OpenAI, Anthropic, and mixed deployments
- remove: verifies both azure_foundry and azure_foundry_openai types cleaned
- OpenAI model handler: no resource, no name, auth failure, success
- Updated register_model_types test for 2 types

* style: ruff format

* fix(azure_foundry): use correct context lengths for OpenAI models

Discovery was hardcoding 128K for all OpenAI models. Added a lookup
table since Azure's catalog API doesn't expose context window sizes.

* feat(azure_foundry): OpenAI Responses API support and reasoning defaults

- Use OpenAIResponsesModel for GPT-5 models on Azure Foundry
- Add azure_foundry_openai to uses_responses_api check
- Default reasoning_summary to "detailed" (auto breaks 5.3 codex)
- Auto-discover supported_settings per model family (GPT-5 gets
  reasoning_effort, summary, verbosity)
- Update tests for Responses API model path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants